<% layout('/layouts/default.html', {title: '接口日志管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-notebook"></i> ${text('接口日志管理')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<% if(hasPermi('interfacelogs:interfaceLogs:edit')){ %>
					<a href="${ctx}/interfacelogs/interfaceLogs/form" class="btn btn-default btnTool" title="${text('新增接口日志')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
				<% } %>
				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${interfaceLogs}" action="${ctx}/interfacelogs/interfaceLogs/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('单据类型')}：</label>
					<div class="control-inline">
						<#form:input path="billType" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('接口名称')}：</label>
					<div class="control-inline">
						<#form:input path="interfaceName" maxlength="100" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('来源单号')}：</label>
					<div class="control-inline">
						<#form:input path="sourceNo" maxlength="100" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm"><i class="glyphicon glyphicon-search"></i> ${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm isQuick"><i class="glyphicon glyphicon-repeat"></i> ${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $('#searchForm'),
	columnModel: [
		{header:'${text("单据类型")}', name:'billType', index:'a.bill_type', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
			return '<a href="${ctx}/interfacelogs/interfaceLogs/form?autoId='+row.autoId+'" class="btnList" data-title="${text("编辑接口日志")}">'+(val||row.id)+'</a>';
		}},
		{header:'${text("接口名称")}', name:'interfaceName', index:'a.interface_name', width:150, align:"left"},
		{header:'${text("来源系统")}', name:'sourceSystem', index:'a.source_system', width:150, align:"left"},
		{header:'${text("目标系统")}', name:'targetSystem', index:'a.target_system', width:150, align:"left"},
		{header:'${text("接口方式")}', name:'interfaceMode', index:'a.interface_mode', width:150, align:"left"},
		{header:'${text("接口地址")}', name:'interfaceUrl', index:'a.interface_url', width:150, align:"left"},
		{header:'${text("输入参数")}', name:'inputParams', index:'a.input_params', width:150, align:"left"},
		{header:'${text("输出参数")}', name:'outputParams', index:'a.output_params', width:150, align:"left"},
		{header:'${text("异常信息")}', name:'exceptionInfo', index:'a.exception_info', width:150, align:"left"},
		{header:'${text("来源ID")}', name:'sourceId', index:'a.source_id', width:150, align:"left"},
		{header:'${text("来源单号")}', name:'sourceNo', index:'a.source_no', width:150, align:"left"},
		{header:'${text("调用开始时间")}', name:'callStartTime', index:'a.call_start_time', width:150, align:"center"},
		{header:'${text("调用结束时间")}', name:'callEndTime', index:'a.call_end_time', width:150, align:"center"},
		{header:'${text("接口状态")}', name:'interfaceStatus', index:'a.interface_status', width:150, align:"left"},
		{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
			var actions = [];
			//# if(hasPermi('interfacelogs:interfaceLogs:edit')){
				actions.push('<a href="${ctx}/interfacelogs/interfaceLogs/form?autoId='+row.autoId+'" class="btnList" title="${text("编辑接口日志")}"><i class="fa fa-pencil"></i></a>&nbsp;');
			//# }
			return actions.join('');
		}}
	],
	//# // 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>